#!/bin/bash
pyFileName="$(dirname "$0")/keymouseCount.py"
pidFileName="pyPID.txt"

if [ -f "$pidFileName" ]; then
    echo "pyFile running, sh exit."
    exit 1
fi

nohup python3 $pyFileName arg1 arg2 > output.log 2>&1 &

echo "start $(dirname "$0")/keymouseCount.py , PID:" + $!

# 保存 Python 进程的 PID 到文件
echo $! > pyPID.txt
